﻿/*
 * Created by SharpDevelop.
 * User: deebug
 * Date: 2008-4-15
 * Time: 5:26
 * 
 * 
 */

using System;
using System.Drawing;

namespace Deebug.Games.ShortBoom.Utility
{
	/// <summary>
	/// Description of Math.
	/// </summary>
	public static class Math
	{
		/// <summary>
		/// 获取两点间的距离
		/// </summary>
		/// <param name="p1">Point1</param>
		/// <param name="p2">Point2</param>
		/// <returns></returns>
		public static double Distance(Point p1,Point p2){
			double x = p1.X - p2.X;
			double y = p1.Y - p2.Y;
			return System.Math.Sqrt(x*x + y*y);
		}
	}
}
